LanguageExt.Core

LanguageExt.Core DataTypes Alternative Value Monads Fin

Contents

struct Fin <A> Source #

Equivalent of Either<Error, A> Called Fin because it is expected to be used as the concrete result of a computation

Fields

field bool IsSucc Source #

Properties

property bool IsFail Source #

property bool IsBottom Source #

property object Case Source #

Reference version for use in pattern-matching

Methods

method Fin<A> Succ (A value) Source #

method Fin<A> Fail (Error error) Source #

method Fin<A> Fail (string error) Source #

method bool Equals (object obj) Source #

Equality

method int GetHashCode () Source #

Get hash code

method int CompareTo (Fin<A> other) Source #

method bool Equals (Fin<A> other) Source #

method IEnumerator<Fin<A>> GetEnumerator () Source #

method string ToString () Source #

method void GetObjectData (SerializationInfo info, StreamingContext context) Source #

method int CompareTo (object obj) Source #

method B Match <B> (Func<A, B> Succ, Func<Error, B> Fail) Source #

method Unit Match (Action<A> Succ, Action<Error> Fail) Source #

method A IfFail (Func<Error, A> Fail) Source #

method A IfFail (in A alternative) Source #

method Unit IfFail (Action<Error> Fail) Source #

method Unit IfSucc (Action<A> Succ) Source #

method Unit Iter (Action<A> Succ) Source #

method Fin<A> Do (Action<A> Succ) Source #

method S Fold <S> (in S state, Func<S, A, S> f) Source #

method S BiFold <S> (in S state, Func<S, A, S> Succ, Func<S, Error, S> Fail) Source #

method bool Exists (Func<A, bool> f) Source #

method bool ForAll (Func<A, bool> f) Source #

method Fin<B> Map <B> (Func<A, B> f) Source #

method Fin<B> BiMap <B> (Func<A, B> Succ, Func<Error, Error> Fail) Source #

method Fin<B> BiMap <B> (Func<A, B> Succ, Func<Error, B> Fail) Source #

method Fin<B> Select <B> (Func<A, B> f) Source #

method Fin<B> Bind <B> (Func<A, Fin<B>> f) Source #

method Fin<B> BiBind <B> (Func<A, Fin<B>> Succ, Func<Error, Fin<B>> Fail) Source #

method Fin<B> SelectMany <B> (Func<A, Fin<B>> f) Source #

method Fin<C> SelectMany <B, C> (Func<A, Fin<B>> bind, Func<A, B, C> project) Source #

method System.Collections.Generic.List<A> ToList () Source #

method Lst<A> ToLst () Source #

method Seq<A> ToSeq () Source #

method Arr<A> ToArr () Source #

method A[] ToArray () Source #

method Option<A> ToOption () Source #

method OptionAsync<A> ToOptionAsync () Source #

method OptionUnsafe<A> ToOptionUnsafe () Source #

method Either<Error, A> ToEither () Source #

method EitherUnsafe<Error, A> ToEitherUnsafe () Source #

method EitherAsync<Error, A> ToEitherAsync () Source #

method Eff<A> ToEff () Source #

method Aff<A> ToAff () Source #

method A ThrowIfFail () Source #

Operators

operator | (Fin<A> left, Fin<A> right) Source #

operator true (Fin<A> ma) Source #

operator false (Fin<A> ma) Source #

operator < (Fin<A> lhs, A rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator <= (Fin<A> lhs, A rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator > (Fin<A> lhs, A rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator >= (Fin<A> lhs, A rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator < (A lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator <= (A lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator > (A lhs, Fin<A>rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator >= (A lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator < (Fin<A> lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs < rhs

operator <= (Fin<A> lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs <= rhs

operator > (Fin<A> lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs > rhs

operator >= (Fin<A> lhs, Fin<A> rhs) Source #

Comparison operator

Parameters

param lhs

The left hand side of the operation

param rhs

The right hand side of the operation

returns

True if lhs >= rhs

operator == (Fin<A> lhs, A rhs) Source #

Equality operator override

operator == (A lhs, Fin<A> rhs) Source #

Equality operator override

operator == (Fin<A> lhs, Fin<A> rhs) Source #

Equality operator override

operator != (Fin<A> lhs, A rhs) Source #

Non-equality operator override

operator != (A lhs, Fin<A> rhs) Source #

Non-equality operator override

operator != (Fin<A> lhs, Fin<A> rhs) Source #

Non-equality operator override

operator == (Fin<A> lhs, Error rhs) Source #

Equality operator override

operator == (Error lhs, Fin<A> rhs) Source #

Equality operator override

operator != (Fin<A> lhs, Error rhs) Source #

Non-equality operator override

operator != (Error lhs, Fin<A> rhs) Source #

Non-equality operator override

class FinExtensions Source #

Extension methods for Fin

Methods

method Fin<R> Flatten <R> (this Fin<Fin<R>> ma) Source #

Monadic join

method Fin<R> Plus <NUM, R> (this Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Add the bound values of x and y, uses an Add type-class to provide the add operation for type A. For example x.Add<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with y added to x

method Fin<R> Subtract <NUM, R> (this Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Find the subtract between the two bound values of x and y, uses a Subtract type-class to provide the subtract operation for type A. For example x.Subtract<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with the subtract between x and y

method Fin<R> Product <NUM, R> (this Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Find the product between the two bound values of x and y, uses a Product type-class to provide the product operation for type A. For example x.Product<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with the product of x and y

method Fin<R> Divide <NUM, R> (this Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Divide the two bound values of x and y, uses a Divide type-class to provide the divide operation for type A. For example x.Divide<TDouble,double>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin x / y

method Fin<B> Apply <A, B> (this Fin<Func<A, B>> fab, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type FB derived from Applicative of B

method Fin<B> Apply <A, B> (this Func<A, B> fab, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type FB derived from Applicative of B

method Fin<C> Apply <A, B, C> (this Fin<Func<A, B, C>> fabc, Fin<A> fa, Fin<B> fb) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative a to apply

param fb

Applicative b to apply

returns

Applicative of type FC derived from Applicative of C

method Fin<C> Apply <A, B, C> (this Func<A, B, C> fabc, Fin<A> fa, Fin<B> fb) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative a to apply

param fb

Applicative b to apply

returns

Applicative of type FC derived from Applicative of C

method Fin<Func<B, C>> Apply <A, B, C> (this Fin<Func<A, B, C>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> Apply <A, B, C> (this Func<A, B, C> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> Apply <A, B, C> (this Fin<Func<A, Func<B, C>>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> Apply <A, B, C> (this Func<A, Func<B, C>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<B> Action <A, B> (this Fin<A> fa, Fin<B> fb) Source #

Evaluate fa, then fb, ignoring the result of fa

Parameters

param fa

Applicative to evaluate first

param fb

Applicative to evaluate second and then return

returns

Applicative of type Fin

method IEnumerable<A> Succs <A> (this IEnumerable<Fin<A>> xs) Source #

Extracts from a list of Fins all the Succ elements.

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of A

method Seq<A> Succs <A> (this Seq<Fin<A>> xs) Source #

Extracts from a list of Fins all the Succ elements.

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of A

method IEnumerable<Error> Fails <A> (this IEnumerable<Fin<A>> xs) Source #

Extracts from a list of Fins all the Fail elements.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of Errors

method Seq<Error> Fails <A> (this Seq<Fin<A>> xs) Source #

Extracts from a list of Fins all the Fail elements.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of Errors

method (IEnumerable<Error> Fails, IEnumerable<A> Succs) Partition <A> (this IEnumerable<Fin<A>> xs) Source #

Partitions a list of 'Fin' into two lists. All the Fail elements are extracted, in order, to the first component of the output. Similarly the Succ elements are extracted to the second component of the output.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Fin list

returns

A tuple containing the an enumerable of Erorr and an enumerable of Succ

method (Seq<Error> Fails, Seq<A> Succs) Partition <A> (this Seq<Fin<A>> xs) Source #

Partitions a list of 'Fin' into two lists. All the Fail elements are extracted, in order, to the first component of the output. Similarly the Succ elements are extracted to the second component of the output.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Fin list

returns

A tuple containing the an enumerable of Erorr and an enumerable of Succ

class FinGuardExtensions Source #

Methods

method Fin<Unit> ToFin (this Guard<Error> ma) Source #

method Fin<B> SelectMany <B> (this Guard<Error> ma, Func<Unit, Fin<B>> f) Source #

method Fin<C> SelectMany <B, C> (this Guard<Error> ma, Func<Unit, Fin<B>> bind, Func<Unit, B, C> project) Source #

method Fin<Unit> SelectMany <A> (this Fin<A> ma, Func<A, Guard<Error>> f) Source #

method Fin<C> SelectMany <A, C> (this Fin<A> ma, Func<A, Guard<Error>> bind, Func<A, Unit, C> project) Source #

class Prelude Source #

Methods

method Fin<R> flatten <R> (Fin<Fin<R>> ma) Source #

Monadic join

method Fin<R> plus <NUM, R> (Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Add the bound values of x and y, uses an Add type-class to provide the add operation for type A. For example x.Add<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with y added to x

method Fin<R> subtract <NUM, R> (Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Find the subtract between the two bound values of x and y, uses a Subtract type-class to provide the subtract operation for type A. For example x.Subtract<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with the subtract between x and y

method Fin<R> product <NUM, R> (Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Find the product between the two bound values of x and y, uses a Product type-class to provide the product operation for type A. For example x.Product<TInteger,int>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin with the product of x and y

method Fin<R> divide <NUM, R> (Fin<R> x, Fin<R> y) Source #

where NUM : struct, Num<R>

Divide the two bound values of x and y, uses a Divide type-class to provide the divide operation for type A. For example x.Divide<TDouble,double>(y)

Parameters

type NUM

Num of A

type A

Bound value type

param x

Left hand side of the operation

param y

Right hand side of the operation

returns

Fin x / y

method Fin<B> apply <A, B> (Fin<Func<A, B>> fab, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type FB derived from Applicative of B

method Fin<B> apply <A, B> (Func<A, B> fab, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type FB derived from Applicative of B

method Fin<C> apply <A, B, C> (Fin<Func<A, B, C>> fabc, Fin<A> fa, Fin<B> fb) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative a to apply

param fb

Applicative b to apply

returns

Applicative of type FC derived from Applicative of C

method Fin<C> apply <A, B, C> (Func<A, B, C> fabc, Fin<A> fa, Fin<B> fb) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative a to apply

param fb

Applicative b to apply

returns

Applicative of type FC derived from Applicative of C

method Fin<Func<B, C>> apply <A, B, C> (Fin<Func<A, B, C>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> apply <A, B, C> (Func<A, B, C> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> apply <A, B, C> (Fin<Func<A, Func<B, C>>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<Func<B, C>> apply <A, B, C> (Func<A, Func<B, C>> fabc, Fin<A> fa) Source #

Apply

Parameters

param fab

Function to apply the applicative to

param fa

Applicative to apply

returns

Applicative of type f(b -> c) derived from Applicative of Func<B, C>

method Fin<B> action <A, B> (Fin<A> fa, Fin<B> fb) Source #

Evaluate fa, then fb, ignoring the result of fa

Parameters

param fa

Applicative to evaluate first

param fb

Applicative to evaluate second and then return

returns

Applicative of type Fin

method bool isSucc <A> (Fin<A> value) Source #

Returns the state of the Fin provided

Parameters

type A

Bound value type

param value

Either to check

returns

True if the Fin is in a Succ state

method bool isFail <A> (Fin<A> value) Source #

Returns the state of the Fin provided

Parameters

type A

Bound value type

param value

Either to check

returns

True if the Fin is in an Error state

method Fin<A> FinSucc <A> (A value) Source #

Fin constructor Constructs a Fin in a success state

Parameters

type A

Bound value type

param value

Success value

returns

A new Fin instance

method Fin<A> FinFail <A> (Error value) Source #

Fin constructor Constructs a Fin in a failure state

Parameters

type A

Bound value type

param value

Failure value

returns

A new Fin instance

method A ifFail <A> (Fin<A> ma, Func<Error, A> Fail) Source #

Executes the Fail function if the Fin is in a failure state. Returns the bound value if the Fin is in a success state.

Parameters

type A

Bound value type

param Fail

Function to generate a Fail value if in the failure state

returns

Returns an unwrapped bound value

method A ifFail <A> (Fin<A> ma, A alternative) Source #

Returns the alternative if the Fin is in a failure state. Returns the bound value if the Fin is in a success state.

Parameters

type A

Bound value type

param alternative

Value to return if in the failure state

returns

Returns an unwrapped value

method Unit ifFail <A> (Fin<A> ma, Action<Error> Left) Source #

Executes the Fail action if the Fin is in a failure state.

Parameters

param Fail

Function to generate a value if in the failure state

returns

Returns an unwrapped value

method Unit ifSucc <A> (Fin<A> ma, Action<A> Succ) Source #

Invokes the Succ action if the Fin is in a success state, otherwise does nothing

Parameters

param Succ

Action to invoke

returns

Unit

method B match <A, B> (Fin<A> ma, Func<A, B> Succ, Func<Error, B> Fail) Source #

Invokes the Succ or Fail function depending on the state of the Fin provided

Parameters

type A

Bound value type

type B

Return type

param ma

Fin to match

param Succ

Function to invoke if in a Succ state

param Fail

Function to invoke if in a Fail state

returns

The return value of the invoked function

method Unit match <A> (Fin<A> ma, Action<A> Succ, Action<Error> Fail) Source #

Invokes the Succ or Fail action depending on the state of the Fin provided

Parameters

type A

Bound value type

param ma

Fin to match

param Succ

Action to invoke if in a Succ state

param Fail

Action to invoke if in a Fail state

returns

Unit

method S fold <S, A> (Fin<A> ma, S state, Func<S, A, S> folder) Source #

Fin types are like lists of 0 or 1 items, and therefore follow the same rules when folding.

In the case of lists, 'Fold', when applied to a binary operator, a starting value(typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

Parameters

type S

Aggregate state type

type A

Bound value type

param state

Initial state

param folder

Folder function, applied if structure is in a Succ state

returns

The aggregate state

method S bifold <S, A> (Fin<A> ma, S state, Func<S, A, S> Right, Func<S, Error, S> Left) Source #

Fin types are like lists of 0 or 1 items, and therefore follow the same rules when folding.

In the case of lists, 'Fold', when applied to a binary operator, a starting value(typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

Parameters

type S

Aggregate state type

type A

Bound value type

param state

Initial state

param Right

Folder function, applied if Either is in a Succ state

param Left

Folder function, applied if Either is in a Fail state

returns

The aggregate state

method bool forall <A> (Fin<A> ma, Func<A, bool> pred) Source #

Invokes a predicate on the value of the Fin if it's in the Succ state

Parameters

type A

Bound value type

param ma

Fin to extract the value from

param pred

Predicate

returns

True if the Fin is in a Fail state. True if the Fin is in a Right state and the predicate returns True. False otherwise.

method bool exists <A> (Fin<A> ma, Func<A, bool> pred) Source #

Invokes a predicate on the value of the Fin if it's in the Succ state

Parameters

type A

Bound value type

param ma

Fin to extract the value from

param pred

Predicate

returns

True if the Fin is in a Succ state and the predicate returns True. False otherwise.

method Fin<B> map <A, B> (Fin<A> ma, Func<A, B> f) Source #

Maps the value in the Either if it's in a Right state

Parameters

type A

Bound value type

type B

Mapped bound value type

param ma

Either to map

param f

Map function

returns

Mapped Either

method Fin<B> bimap <A, B> (Fin<A> ma, Func<A, B> Succ, Func<Error, Error> Fail) Source #

Bi-maps the value in the Fin

Parameters

type A

Bound value type

type B

Mapped value type if in Succ state

param ma

Fin to map

param Succ

Success state map function

param Fail

Failure state map function

returns

Bi-mapped Fin

method Fin<B> bind <A, B> (Fin<A> ma, Func<A, Fin<B>> f) Source #

method IEnumerable<B> Match <A, B> (this IEnumerable<Fin<A>> xs, Func<A, B> Succ, Func<Error, B> Fail ) Source #

Match over a sequence of Fins

Parameters

type A

Bound values type

type B

Mapped bound values type

param xs

Sequence to match over

param Succ

Success state match function

param Fail

Failure state match function

returns

Sequence of mapped values

method IEnumerable<B> match <A, B> (IEnumerable<Fin<A>> xs, Func<A, B> Succ, Func<Error, B> Fail) Source #

Match over a sequence of Fins

Bottom values are dropped

Parameters

type A

Bound values type

type B

Mapped bound values type

param xs

Sequence to match over

param Succ

Success state match function

param Fail

Failure state match function

returns

Sequence of mapped values

method IEnumerable<A> succs <A> (IEnumerable<Fin<A>> xs) Source #

Extracts from a list of Fins all the Succ elements.

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of A

method Seq<A> succs <A> (Seq<Fin<A>> xs) Source #

Extracts from a list of Fins all the Succ elements.

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of A

method IEnumerable<Error> fails <A> (IEnumerable<Fin<A>> xs) Source #

Extracts from a list of Fins all the Fail elements.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of Errors

method Seq<Error> fails <A> (Seq<Fin<A>> xs) Source #

Extracts from a list of Fins all the Fail elements.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Sequence of Fins

returns

An enumerable of Errors

method (IEnumerable<Error> Fails, IEnumerable<A> Succs) partition <A> (IEnumerable<Fin<A>> xs) Source #

Partitions a list of 'Fin' into two lists. All the Fail elements are extracted, in order, to the first component of the output. Similarly the Succ elements are extracted to the second component of the output.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Fin list

returns

A tuple containing the an enumerable of Erorr and an enumerable of Succ

method (Seq<Error> Fails, Seq<A> Succs) partition <A> (Seq<Fin<A>> xs) Source #

Partitions a list of 'Fin' into two lists. All the Fail elements are extracted, in order, to the first component of the output. Similarly the Succ elements are extracted to the second component of the output.

Bottom values are dropped

Parameters

type A

Bound value type

param xs

Fin list

returns

A tuple containing the an enumerable of Erorr and an enumerable of Succ